/* indent size: 1 */

module.exports = app => {
	const DataTypes = app.Sequelize;

	const Model = app.model.define('auth_user_group', {
        id: {
			type: DataTypes.INTEGER(8).UNSIGNED,
			allowNull: false,
			primaryKey: true,
			autoIncrement: true
		},
        user_id: {
            type: DataTypes.INTEGER(11),
            allowNull: false,
        },
        group_id: {
            type: DataTypes.INTEGER(11),
            allowNull: false,
		},
		is_delete: {
			type: DataTypes.INTEGER(1).UNSIGNED,
			allowNull: false,
			defaultValue: '0',
			comment: '是否删除，0->存在，1->删除'
		},
	}, {
		tableName: 'auth_user_group',
		timestamps: false
	});

	Model.sync({ alter: true });

	Model.associate = function() {
	}

	return Model;
};
